import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import VueI18n from 'vue-i18n';
import echarts from 'echarts'
import {messages} from './components/common/i18n';
import 'element-ui/lib/theme-chalk/index.css'; // 默认主题
// import './styles/theme-green/index.css'; // 浅绿色主题
import './styles/admin-css/icon.css';
import './components/common/directives';
import tools from "./utils/tools";
import axios from 'axios'
import JsonExcel from 'vue-json-excel'

Vue.component('downloadExcel', JsonExcel)
Vue.config.productionTip = false
Vue.prototype.$axios = axios
Vue.prototype.$bus = new Vue() // event Bus 用于无关系组件间的通信

Vue.use(VueI18n);
Vue.use(ElementUI, {
    size: 'small'
});
const i18n = new VueI18n({
    locale: 'zh',
    messages
});
Vue.prototype.$echarts = echarts
Vue.prototype.$tools = tools

require('./config/methods');
require('./config/directives');
require('./config/filters');
require('./config/api');
require('./plugins/directive');
require('./plugins/bmap.js');

new Vue({
    router,
    store,
    i18n,
    render: h => h(App)
}).$mount('#app')
